<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/elec/elecStationPrice.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return'<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>设备管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>编辑电费</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">编辑电费</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="addElecStationPrice">
                        <input name="priceId" id="priceId" value="${elecStationPrice.priceId}" type="hidden">
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">时段：</label>
                            <div class="col-sm-8">
                                <select class="form-control" name="priceCode" id="priceCode">
                                    <option value="1"
                                            <c:if test="${elecStationPrice.priceCode eq '1'}">selected</c:if> >尖峰
                                    </option>
                                    <option value="2"
                                            <c:if test="${elecStationPrice.priceCode eq '2'}">selected</c:if> >高峰
                                    </option>
                                    <option value="3"
                                            <c:if test="${elecStationPrice.priceCode eq '3'}">selected</c:if> >平段
                                    </option>
                                    <option value="4"
                                            <c:if test="${elecStationPrice.priceCode eq '4'}">selected</c:if> >低谷
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">基本电费单价：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="elecPrice" name="elecPrice"
                                       value="${elecStationPrice.elecPrice}">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">服务电费单价：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="servicePrice" name="servicePrice"
                                       value="${elecStationPrice.servicePrice}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">开始日期：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="beginDate"  name="beginDate"
                                     value="${elecStationPrice.beginDate}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">结束日期：</label>
                            <div class="col-sm-8">
                                <input type="text" class="form-control" id="endDate"  name="endDate"
                                      value="${elecStationPrice.endDate}">
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">开始时间：</label>
                            <div class="col-sm-8">
                                <%--<input type="text" class="form-control" id="beginTime" name="beginTime"
                                       value="<fmt:formatDate value="${elecStationPrice.beginTime}" pattern="HH:mm:ss" />">--%>
                                <input type="text" class="form-control" id="beginTime"  name="beginTime"
                                       value="${elecStationPrice.beginTime}">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">结束时间：</label>
                            <div class="col-sm-8">
                                <%--<input type="text" class="form-control" id="endTime" name="endTime"
                                       value="<fmt:formatDate value="${elecStationPrice.endTime}" pattern="HH:mm:ss" />">--%>
                                <input type="text" class="form-control" id="endTime"  name="endTime"
                                       value="${elecStationPrice.endTime}">
                            </div>
                        </div>


                        <div class="form-group">
                            <div class="col-sm-3 col-sm-offset-8 text-right">
                                <button type="submit" class="btn btn-primary">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    layui.use('laydate', function () {
        var laydate = layui.laydate;
        var beginTime = laydate.render({
            elem: '#beginTime',
            type: 'time',
            format: 'HH:mm:ss',
            trigger: 'click'
        });
        var endTime = laydate.render({
            elem: '#endTime',
            type: 'time',
            format: 'HH:mm:ss',
            trigger: 'click'
        });
        var beginDate = laydate.render({
            elem: '#beginDate',
            type: 'date',
            format: 'yyyy-MM-dd',
            trigger: 'click'
        });
        var endDate = laydate.render({
            elem: '#endDate',
            type: 'date',
            format: 'yyyy-MM-dd',
            trigger: 'click'
        });

    });

    addElecStationPrice.init();
</script>
</body>
</html>
